using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI.WebControls;

using Pampa.Grid.UI.CustomControls;

namespace Pampa.Grid.Core
{
    public class Column
    {
        private CustomGrid parent;

        private string field; 
        private string title;
        private string cssClass;
        private ColumnType type;
        private string format;
        private bool isId;
        private bool isElegible;

        public Column(CustomGrid parent)
        {
            this.parent = parent;
            this.isElegible = true;
        }

        #region Properties

        public string Field
        {
            get { return field; }
            set { field = value; }
        }

        public string Title
        {
            get { return title; }
            set { title = value;  }
        }

        public string CssClass
        {
            get { return cssClass; }
            set { cssClass = value; }
        }

        public ColumnType Type
        {
            get { return type; }
            set { type = value; }
        }

        public string Format
        {
            get { return format; }
            set { format = value; }
        }

        public bool IsId
        {
            get { return isId; }
            set { isId = value; }
        }

        public bool IsElegible
        {
            get { return isElegible; }
            set { isElegible = value; }
        }

        #endregion

        public Column Clone()
        {
            Column column = new Column(this.parent);

            column.Field = this.Field;
            column.Title = this.Title;
            column.CssClass = this.CssClass;
            column.Type = this.Type;
            column.Format = this.Format;
            column.IsId = this.IsId;
            column.IsElegible = this.IsElegible;

            return column;
        }
    }
}
